﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BDS3M.Admin.Controls
{
    public partial class ShowAccount : System.Web.UI.UserControl
    {
        public string avatar;
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable loginaccount = DAL.DCollector.DBCollector.Instance.CallStored("callstored", "select * from tbl_Account where Account_ID=" + Session["Account_ID"].ToString(), true);
            avatar = loginaccount.Rows[0]["Account_Avatar"].ToString();                    
        }

        protected void lbtLogout_Click(object sender, EventArgs e)
        {
            if (Request.Cookies["CookieUser"] != null)
            {
                HttpCookie cki = new HttpCookie("CookieUser");
                cki.Expires = DateTime.Now.AddDays(-1);
                Response.Cookies.Add(cki);
            }
            Session.RemoveAll();
            Response.Redirect("~/Admin/Login.aspx");
        }     
    }
}